
<form action="" method="post" enctype="multipart/form-data" name="form1">
	<h3>
		<?php echo $mode == 'edit' ? "Update User's Information" : "Add a new user" ?>
	</h3>
	<div style="width: 200px; float: left; text-align: center">
		<div class="img-box-profile"
			style="margin-left: 35px; margin-bottom: 10px;">
			<img
				src="<?php echo base_url(isset($user['image']) ? $user['image'] : 'images/1281367331_contact-new.png'); ?>" />
		</div>
		<div id="avatar">
			<input id="file_upload" type="file" /> <input type="hidden"
				id="avatar_image" name="tbImage"
				value="images/1281367331_contact-new.png" />
		</div>
	</div>

	<table width="500" border="0" cellspacing="2" cellpadding="2"
		style="display: inline-table; float: left; margin-left: 30px">

		<tr>
			<td width="189"><?php echo lang('user_fullname')?></td>
			<td width="410"><label for="textfield"></label> <input type="text"
				name="fullname" id="fullname" style="width: 250px"
				value="<?php echo $user['fullname'] ?>"> <span class="font-error">
			</span>
			</td>
		</tr>
		<tr>
			<td><?php echo lang('user_username')?></td>
			<td><input type="text" name="username" id="username"
				style="width: 150px" value="<?php echo $user['username'] ?>"
					<?php echo $mode == 'edit' ? 'readonly' : '' ?> />
			</td>
		</tr>
		<tr>
			<td valign="top"><?php echo lang('user_password')?></td>
			<td><input type="password" name="password" id="password"
				style="width: 150px" value="<?php echo $user['password'] ?>"> 
			</td>
		</tr>
		<tr>
			<td valign="top"><?php echo lang('user_password_retype')?></td>
			<td><input type="password" name="tbPasswordRetyped"
				id="tbPasswordRetyped" style="width: 150px"
				value="<?php echo $passwordRetyped ?>"><br /> <br />
			</td>
		</tr>

		<tr>
			<td valign="top"><?php echo lang('user_type')?></td>
			<td></td>
		</tr>

		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td><?php echo lang('user_nric')?></td>
			<td><input type="text" name="tbNRICPassport" id="tbNRICPassport"
				style="width: 120px" value="<?php echo $user['NRICPassport'] ?>"></td>
		</tr>
		<tr>
			<td><?php echo lang('user_address')?></td>
			<td><input type="text" name="tbAddress" id="tbAddress"
				style="width: 250px" value="<?php echo $user['address'] ?>"></td>
		</tr>
		<tr>
			<td><?php echo lang('user_postcode')?></td>
			<td><input type="text" name="tbPostcode" id="tbPostcode"
				style="width: 80px" value="<?php echo $user['postCode'] ?>"></td>
		</tr>
		<tr>
			<td><?php echo lang('user_phone')?></td>
			<td><input type="text" name="tbPhone" id="tbPhone"
				style="width: 80px" value="<?php echo $user['phone'] ?>">
			</td>
		</tr>
		<tr>
			<td><?php echo lang('user_alter_phone')?></td>
			<td><input type="text" name="tbAlterPhone" id="tbAlterPhone"
				style="width: 80px" value="<?php echo $user['alterPhone'] ?>">
			</td>
		</tr>
		<tr>
			<td><?php echo lang('user_email')?></td>
			<td><input type="text" name="tbEmail" id="tbEmail"
				style="width: 180px" value="<?php echo $user['email'] ?>"> 
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>

		<tr>
			<td colspan="2" align="center"><input type="submit" name="btnSubmit"
				id="btnSubmit"
				value="<?php if ($mode == 'edit')
                                        echo 'update'; else
                                        echo 'add user'; ?>"> <input
				type="button" name="button2" id="button2" value="Reset"
				onClick="resetForm();">
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td></td>
		</tr>
	</table>
</form>
